package Retangle;
import Retangle.Point;

public class Rectangle {
	private Point p1, p2;
	
	public Rectangle(Point p1, Point p2) {
		 
        this.p1 = p1;
        this.p2 = p2;

} 

	public Double getArea() {
		 
        Double width = p2.x - p1.x;
        Double height = p2.y - p1.y;
        Double area = Math.abs(width*height);
        return area;
} 

	
	public Double getDiagonal() {
		 
        Double width = p2.x - p1.x;
        Double height = p2.y - p1.y;
        Double diagonal =  Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));
        return diagonal;

}


}
